/*
 * Signature3.java Created on Jan 13, 2008 by M.C.Boulahiya
 */
package model;

/**
 * @author M.C.Boulahiya
 *
 */
public class Signature3 {
	public double[] nuplet;

	public Signature3() {
		this.nuplet = new double[3];
	}

	public String toString() {
		String str = this.nuplet[0] + " " + this.nuplet[1] + " " + this.nuplet[2] + "\n";    
		return str;
	}

	public boolean equals(Object obj) {// TODO epsilonEqual ?
		Signature3 s = (Signature3)obj;
		double dist = (this.nuplet[0] - s.nuplet[0]) * (this.nuplet[0] - s.nuplet[0]);
		dist += (this.nuplet[1] - s.nuplet[1]) * (this.nuplet[1] - s.nuplet[1]);
		dist += (this.nuplet[2] - s.nuplet[2]) * (this.nuplet[2] - s.nuplet[2]);
		dist = Math.sqrt(dist);
		//System.out.println(dist);
		return (dist < 0.5);
	}

}
// End of class Signature3

// End of file Signature3.java